package com.stock.demo.adapter;

import android.content.Context;
import android.view.View;

import com.stock.demo.R;
import com.stock.demo.adapter.viewholder.StockViewHolder;
import com.stock.demo.function.home.view.CourseDetailActivity;
import com.stock.demo.model.CourseLearningBean;

import java.util.ArrayList;

/**
 * Created by xuzhaoyu on 17-7-31.
 */

public class CourseLearningAdapter extends StockBaseAdapter<CourseLearningBean> {

    private Context mContext;

    public CourseLearningAdapter(Context context, ArrayList<CourseLearningBean> data) {
        super(context, data);
        mContext = context;
    }

    @Override
    public int setLayoutResId() {
        return R.layout.view_course_learning_item;
    }

    @Override
    public void onBindViewHolder(StockViewHolder holder, int position) {
        holder.itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                CourseDetailActivity.startAction(mContext);
            }
        });
    }

}
